<template>
  <bc-modal>
    <order-operate-template :fixedAmount="fixedAmount" @click="hideAddToCart">
      添加号码
      <template v-slot:buttons>
        <div class="btns">
          <button 
            class="btn cancel button-unselected"
            @click="handleCancel"
          >取消</button>
          <button 
            class="btn confirm button-selected"
            @click="handleBuyingNow"
          >确认添加</button>
        </div>
      </template>
    </order-operate-template>
  </bc-modal>
</template>
<script>
import OrderOperateTemplate from '@/components/base/phone/order-operate-template/order-operate-template'
import BcModal from '@/components/base/bc-modal/bc-modal'
import { addLotteryToCartMixin } from '@/assets/js/mixin.js'
export default {
  mixins: [addLotteryToCartMixin],
  components: {
    OrderOperateTemplate,
    BcModal
  },
  data() {
    return {
      fixedAmount: [
        {
          id: 1,
          amount: 10,
          icon: ' '
        },
        {
          id: 2,
          amount: 20,
          icon: ' '
        },
        {
          id: 3,
          amount: 50,
          icon: ' '
        },
        {
          id: 4,
          amount: 100,
          icon: ' '
        },
        {
          id: 5,
          amount: 500,
          icon: ' '
        },
        {
          id: 6,
          amount: 10,
          icon: ' '
        },
        {
          id: 7,
          amount: 20,
          icon: ' '
        },
        {
          id: 8,
          amount: 50,
          icon: ' '
        },
        {
          id: 9,
          amount: 100,
          icon: ' '
        },
        {
          id: 10,
          amount: 500,
          icon: ' '
        },
      ],
    }
  },
  methods: {
    hideAddToCart() {
      this.$emit('click', false)
    },
    handleBuyingNow() {
      this.addLotteryToCart()
      this.hideAddToCart()
    },
    handleCancel() {
      this.$emit('click', false)
    }
  }
}
</script>

<style lang="stylus" scoped>
@import '~@/assets/styles/variables.styl'
  
</style>